﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Areas/CustomerAdmin/Customer.Master" CodeBehind="ViewGroups.aspx.cs" Inherits="OnlineBusinesses.Areas.CustomerAdmin.ViewGroups" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="ContentCustomerAdmin">
    <div class="col-md-12 col-lg-12 col-xs-12 col-sm-12" style="padding: 10px;">
        <asp:HiddenField ID="hdDepartmentID" runat="server" />
        <div class="col-md-10 col-lg-10 col-xs-12 col-sm-12" style="padding: 0px;">
            <div class="col-md-12 col-lg-12 col-xs-12 col-sm-12" style="padding: 0px;">
                <h3 style="font-weight: bold;">
                    <asp:Label ID="lbDepartmentName" runat="server" Text="Label"></asp:Label>
                </h3>
            </div>
            <div class="col-md-12 col-lg-12 col-xs-12 col-sm-12" style="padding: 0px;">
                <h5 style="font-weight: bold;">
                    <asp:Label ID="lbDepartmentDesc" runat="server" Text="Label"></asp:Label>
                </h5>
            </div>
        </div>
        <div class="col-md-2 col-lg-2 hidden-xs hidden-sm" style="padding: 0px;line-height:55px;text-align:right;">
            <a href="Groups.aspx" class="btn btn-default" style="border-radius:0px;">Quay lại</a>
        </div>
    </div>
    
    <div class="col-md-12 col-lg-12 col-xs-12 col-sm-12" style="padding: 10px 0px;">
        <div class="table-responsive col-md-12 col-lg-12 col-xs-12 col-sm-12">

            <asp:ListView
                ID="lvDepartment"
                runat="server">
                <LayoutTemplate>
                    <table class="table-bordered table-striped table">
                        <thead>
                            <tr>
                                <th style="width: 70px;">Avatar</th>
                                <th>Họ Tên</th>
                                <th>Chức vụ</th>
                                <th>Email</th>
                                <th>Ngày tham gia</th>
                                <th>Số điện thoại</th>
                                <th style="width: 100px;">Tùy chỉnh</th>
                            </tr>
                        </thead>
                        <!-- Trưởng nhóm sử dụng như 1 radio-->
                        <tbody>
                            <tr id="ItemPlaceholder" runat="server">
                            </tr>
                        </tbody>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td style="vertical-align: middle; text-align: center;">
                            <img class="img-circle img img-thumbnail" style="width: 100%;" src="<%# Eval("Avatar")%>" /></td>
                        <td style="vertical-align: middle;"><%# Eval("AccountName")%></td>
                        <td style="vertical-align: middle;"><%# Eval("Function")%></td>
                        <td style="vertical-align: middle;"><%# Eval("Email")%></td>
                        <td style="vertical-align: middle;"><%# DateTime.Parse(Eval("CreateDate").ToString()).ToString("dd/MM/yyyy") %></td>
                        <td style="vertical-align: middle;"><%# Eval("Phone")%></td>
                        <td style="vertical-align: middle; text-align: center;">
                            <asp:LinkButton ID="LinkButton1" runat="server" 
                                OnCommand="btnMainDepartment_Click" 
                                CommandArgument='<%#Eval("AccountID") %>' 
                                class="btn btn-default" style="text-decoration: none; color: #333;border-radius:0px;"
                                data-toggle="tooltip" data-placement="bottom" 
                                title="Bổ nhiệm trường phòng ban">
                                <span class="fa fa-star <%# bool.Parse(Eval("IsMainDepartment").ToString()) == true ? "text-danger" : "text-info" %>"></span>
                            </asp:LinkButton>
                            <asp:LinkButton ID="btnDel" runat="server" 
                                OnCommand="btnDel_Click" 
                                CommandArgument='<%#Eval("AccountID") %>' 
                                OnClientClick="return confirm('Bạn có chắc là muốn xoá không?');" 
                                class="btn btn-default" style="border-radius: 0px;" 
                                data-toggle="tooltip" data-placement="bottom" 
                                title="Người dùng rời phòng ban"><i class="fa fa-sign-out"></i></asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
        </div>
    </div>
</asp:Content>
